/* ================================
   通用布局 - 侧边栏和导航
   ================================ */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: 256px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #5b73c4 100%);
  border-right: 1px solid rgba(255, 255, 255, 0.2);
  z-index: 1000;
  transition: var(--transition-slow);
  box-shadow: 0 8px 32px rgba(102, 126, 234, 0.3);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sidebar-header {
  padding: 20px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  flex-shrink: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.1) 100%);
  backdrop-filter: blur(10px);
}

.sidebar-brand {
  font-size: 18px;
  font-weight: 600;
  color: #ffffff;
  text-decoration: none;
  display: flex;
  align-items: center;
  transition: var(--transition-base);
}

.sidebar-brand:hover {
  color: #f0f8ff;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.sidebar-brand i {
  color: #ffd700;
  margin-right: 12px;
  font-size: 20px;
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.sidebar-nav {
  padding: 12px 0;
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0%, transparent 100%);
}

/* 侧边栏滚动条样式 */
.sidebar-nav::-webkit-scrollbar {
  width: 4px;
}

.sidebar-nav::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar-nav::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.4);
  border-radius: 2px;
  transition: var(--transition-base);
}

.sidebar-nav::-webkit-scrollbar-thumb:hover {
  background: rgba(148, 163, 184, 0.6);
}

/* Firefox滚动条样式 */
.sidebar-nav {
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.4) transparent;
}

.nav-item {
  margin: 2px 12px;
}

.nav-link {
  display: flex;
  align-items: center;
  padding: 8px 16px;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: var(--transition-base);
  border-radius: var(--radius-base);
  font-size: 14px;
  font-weight: 500;
  position: relative;
  min-height: 40px;
  backdrop-filter: blur(5px);
}

.nav-link:hover {
  color: #ffffff;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.1));
  border: 1px solid rgba(255, 255, 255, 0.3);
  transform: translateX(2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.nav-link.active {
  color: #ffffff;
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.3), rgba(255, 215, 0, 0.1));
  border: 1px solid rgba(255, 215, 0, 0.5);
  font-weight: 600;
  box-shadow: 0 4px 16px rgba(255, 215, 0, 0.3);
}

.nav-link.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 20px;
  background: linear-gradient(135deg, #ffd700, #ffed4e);
  border-radius: 0 2px 2px 0;
  box-shadow: 0 0 12px rgba(255, 215, 0, 0.6);
}

.nav-link i {
  margin-right: 12px;
  width: 16px;
  text-align: center;
  font-size: 16px;
  flex-shrink: 0;
}

.nav-divider {
  padding: 8px 16px;
  margin: 8px 12px 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.nav-divider small {
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 11px;
}

/* ================================
   主内容区域
   ================================ */
.main-content {
  margin-left: 256px;
  padding: 24px;
  min-height: 100vh;
  background: linear-gradient(135deg, #f8faff 0%, #f0f4ff 50%, #e8f2ff 100%);
  transition: var(--transition-slow);
  position: relative;
}

.main-content::before {
  content: '';
  position: fixed;
  top: 0;
  left: 256px;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 80%, rgba(102, 126, 234, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(118, 75, 162, 0.06) 0%, transparent 50%),
    radial-gradient(circle at 40% 40%, rgba(255, 215, 0, 0.04) 0%, transparent 50%);
  pointer-events: none;
  z-index: -1;
}

.content-section {
  display: none;
}

.content-section.active {
  display: block;
  animation: fadeInUp 0.4s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.content-header {
  margin-bottom: 24px;
  padding: 20px 0;
  border-bottom: 2px solid transparent;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(248, 250, 255, 0.7) 100%);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(102, 126, 234, 0.1);
}

.content-header::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #667eea, #764ba2, #ffd700);
}

.content-header h2 {
  color: var(--text-primary);
  margin: 0;
  font-weight: 700;
  font-size: 24px;
  background: linear-gradient(135deg, #2d3748, #667eea);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.content-header p {
  color: var(--text-secondary);
  margin: 8px 0 0 0;
  font-size: 14px;
}

.content-body {
  position: relative;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    width: 280px;
    box-shadow: var(--shadow-4);
  }

  .sidebar.show {
    transform: translateX(0);
  }

  .main-content {
    margin-left: 0;
    padding: 16px;
  }
  
  .main-content::before {
    left: 0;
  }
  
  .content-header {
    padding: 16px 20px;
  }
  
  .content-header h2 {
    font-size: 20px;
  }
  
  .content-body {
    padding: 16px 20px;
  }
}



/* 内容区域样式 */
.content-section {
  display: none;
}

.content-section.active {
  display: block;
}
